﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataStore" targetNamespace="http://tempuri.org/DataStore.xsd" xmlns:mstns="http://tempuri.org/DataStore.xsd" xmlns="http://tempuri.org/DataStore.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections />
        <Tables />
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DataStore" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DataStore" msprop:Generator_DataSetName="DataStore" msprop:EnableTableAdapterManager="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Category" msprop:Generator_UserTableName="Category" msprop:Generator_RowDeletedName="CategoryRowDeleted" msprop:Generator_RowChangedName="CategoryRowChanged" msprop:Generator_RowClassName="CategoryRow" msprop:Generator_RowChangingName="CategoryRowChanging" msprop:Generator_RowEvArgName="CategoryRowChangeEvent" msprop:Generator_RowEvHandlerName="CategoryRowChangeEventHandler" msprop:Generator_TableClassName="CategoryDataTable" msprop:Generator_TableVarName="tableCategory" msprop:Generator_RowDeletingName="CategoryRowDeleting" msprop:Generator_TablePropName="Category">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="CategoryId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="1" msprop:Generator_UserColumnName="CategoryId" msprop:Generator_ColumnVarNameInTable="columnCategoryId" msprop:Generator_ColumnPropNameInRow="CategoryId" msprop:Generator_ColumnPropNameInTable="CategoryIdColumn" type="xs:int" />
              <xs:element name="CategoryName" msprop:Generator_UserColumnName="CategoryName" msprop:nullValue="_throw" msprop:Generator_ColumnPropNameInRow="CategoryName" msprop:Generator_ColumnPropNameInTable="CategoryNameColumn" msprop:Generator_ColumnVarNameInTable="columnCategoryName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ParentCategoryId" msprop:Generator_UserColumnName="ParentCategoryId" msprop:nullValue="_throw" msprop:Generator_ColumnPropNameInRow="ParentCategoryId" msprop:Generator_ColumnPropNameInTable="ParentCategoryIdColumn" msprop:Generator_ColumnVarNameInTable="columnParentCategoryId" type="xs:int" default="1" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Expense" msprop:Generator_UserTableName="Expense" msprop:Generator_RowDeletedName="ExpenseRowDeleted" msprop:Generator_RowChangedName="ExpenseRowChanged" msprop:Generator_RowClassName="ExpenseRow" msprop:Generator_RowChangingName="ExpenseRowChanging" msprop:Generator_RowEvArgName="ExpenseRowChangeEvent" msprop:Generator_RowEvHandlerName="ExpenseRowChangeEventHandler" msprop:Generator_TableClassName="ExpenseDataTable" msprop:Generator_TableVarName="tableExpense" msprop:Generator_RowDeletingName="ExpenseRowDeleting" msprop:Generator_TablePropName="Expense">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ExpenseDate" msprop:Generator_UserColumnName="ExpenseDate" msprop:Generator_ColumnVarNameInTable="columnExpenseDate" msprop:Generator_ColumnPropNameInRow="ExpenseDate" msprop:Generator_ColumnPropNameInTable="ExpenseDateColumn" type="xs:dateTime" default="2010-01-01T00:00:00+02:00" />
              <xs:element name="Amount" msprop:Generator_UserColumnName="Amount" msprop:Generator_ColumnVarNameInTable="columnAmount" msprop:Generator_ColumnPropNameInRow="Amount" msprop:Generator_ColumnPropNameInTable="AmountColumn" type="xs:decimal" default="0" minOccurs="0" />
              <xs:element name="CategoryId" msprop:Generator_UserColumnName="CategoryId" msprop:Generator_ColumnVarNameInTable="columnCategoryId" msprop:Generator_ColumnPropNameInRow="CategoryId" msprop:Generator_ColumnPropNameInTable="CategoryIdColumn" type="xs:int" default="1" minOccurs="0" />
              <xs:element name="Description" msprop:Generator_UserColumnName="Description" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" msprop:Generator_ColumnPropNameInRow="Description" type="xs:string" minOccurs="0" />
              <xs:element name="ExpenseId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="1" msprop:Generator_UserColumnName="ExpenseId" msprop:Generator_ColumnVarNameInTable="columnExpenseId" msprop:Generator_ColumnPropNameInRow="ExpenseId" msprop:Generator_ColumnPropNameInTable="ExpenseIdColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Category" />
      <xs:field xpath="mstns:CategoryId" />
    </xs:unique>
    <xs:unique name="Expense_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Expense" />
      <xs:field xpath="mstns:ExpenseId" />
    </xs:unique>
    <xs:keyref name="FK_Category_Expense" refer="Constraint1" msprop:rel_Generator_UserRelationName="FK_Category_Expense" msprop:rel_Generator_RelationVarName="relationFK_Category_Expense" msprop:rel_Generator_UserChildTable="Expense" msprop:rel_Generator_UserParentTable="Category" msprop:rel_Generator_ParentPropName="CategoryRow" msprop:rel_Generator_ChildPropName="GetExpenseRows">
      <xs:selector xpath=".//mstns:Expense" />
      <xs:field xpath="mstns:CategoryId" />
    </xs:keyref>
  </xs:element>
</xs:schema>